Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

Additional logging for ReflectionTypeLoadException #43

Merged
merged 2 commits into from
Jul 2, 2022

Conversation

zkxs
Copy link
Collaborator

@zkxs zkxs commented Jul 2, 2022

This is to help troubleshoot mod loading issues such as this.

Relevant log snippet:

8:42:44 pm.573	[ERROR][NeosModLoader] Unexpected exception initializing mod from C:\Program Files (x86)\Steam\steamapps\common\NeosVR\HeadlessClient\nml_mods\HeadlessTweaks.dll:
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.Assembly.GetTypes()
   at NeosModLoader.ModLoader.InitializeMod(AssemblyFile mod)
   at NeosModLoader.ModLoader.LoadMods()

I'm actually very mad that Microsoft just logs in their Exception.ToString() that they were too lazy to implement a proper ToString() and it's somehow my job.


Also, the VS code cleanup disliked some imports in EnumerableInjector.

@zkxs zkxs force-pushed the ReflectionTypeLoadException-logging branch from 68c1d3a to 0af4124 Compare July 2, 2022 11:25
Also, the VS code cleanup disliked some imports in EnumerableInjector.
@zkxs zkxs force-pushed the ReflectionTypeLoadException-logging branch from 0af4124 to b46ceb8 Compare July 2, 2022 11:27
Copy link
Member

@ljoonal ljoonal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks simple enough that I'll trust it to not be sussy and not bother opening this in an IDE.

@zkxs
Copy link
Collaborator Author

zkxs commented Jul 2, 2022

Eh, not any reason to sit around waiting for code reviews for such a simple change, especially when folks in the Discord are waiting on it.

edit: of course I write this AS a review gets done

@zkxs zkxs merged commit 0bd2f08 into master Jul 2, 2022
@zkxs zkxs deleted the ReflectionTypeLoadException-logging branch August 26, 2022 19:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants